StringG.this

Creates a new #GString with @len bytes of the @init buffer. Because a length is provided, @init need not be nul-terminated, and can contain embedded nul bytes.

Since this function does not stop at nul bytes, it is the caller's responsibility to ensure that @init has at least @len addressable bytes.

  1. this(GString* gString, bool ownedRef)
  2. this(string init)
  3. this(string init, ptrdiff_t len)
    class StringG
    this
    (
    string init
    ,
    ptrdiff_t len
    )
  4. this(size_t dflSize)

Parameters

init string

initial contents of the string

len ptrdiff_t

length of @init to use

Return Value

a new #GString

Throws

ConstructionException GTK+ fails to create the object.

Meta